﻿using Newtonsoft.Json;
using RXY_Mall.Core.Tool;
using RXY_Mall.Domain.Rxy;
using System.Web.Mvc;

namespace RXY_Mall.Api.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            //JiGuangSDK.PushHelper.ExecuteDeviceEample();
            //JiGuangSDK.PushHelper.ExecutePush();
            //JiGuangSDK.PushHelper.ExecuteReportExample();
            //JiGuangSDK.PushHelper.ExecuteScheduleExample();

            //ViewBag.Title = "Home Page";
            //XsmTestSimpleModel model = new XsmTestSimpleModel()
            //{
            //    testDate = "2018-12-06",
            //    testDouble = 3.14159,
            //    testString = "china",
            //    testInt = 100,
            //};
            //var json = JsonConvert.SerializeObject(model);
            //var result = RxyHttpUtils.TransferSync_Post("APP002", "YH0002", "HelloWorldServlet", json);

            //var order = new XsmOrderHeadModel()
            //{
            //    xsmBillNo = "xsm1234567",
            //    isFromVehicle = "X",
            //    payStatus = "1",
            //    billStatus = "0",
            //    xsmCustomerID = "xsmcus002222",
            //};

            //var customer = new XsmCustomerModel()
            //{
            //    address = "henanshengzhengzhoushi",
            //    customerName = "fada",
            //    boss = "张老板",
            //    xsmCustomerID = "xsm0001002",
            //    phoneNumber = "13866668888",
            //    customerStreet = "renmilu1001hao",
            //    customerProvince = "410000",
            //    customerCity = "410100",
            //    customerCounty = "410101",
            //};
            //order.xsmCustomerModel = customer;

            //var detail1 = new XsmOrderDetailModel()
            //{
            //    billPrice = "100",
            //    billQty = "10",
            //    isLargess = "Y",
            //    xsmItemID = "xsmit0001",
            //    totalAmt = "1000",
            //};
            //order.xsmOrderDetailList = new System.Collections.Generic.List<XsmOrderDetailModel>();
            //order.xsmOrderDetailList.Add(detail1);

            //json = JsonConvert.SerializeObject(order);



            //result = RxyHttpUtils.TransferSync_Post("APP002", "YH0028", "OrderAcceptServlet", json);

            //var resultModel = JsonConvert.DeserializeObject<RxyResultModel>(result);

            return View();
        }

        public class XsmTestSimpleModel
        {

            public string testString { get; set; }
            public double testDouble { get; set; }
            public int testInt { get; set; }
            public string testDate { get; set; }
        }


    }
}
